go/types.Checker.sprintf (method)
52 uses
go/types (current package)
assignments.go#L72: msg := check.sprintf("cannot use %s as %s value in %s", x, target, context)
assignments.go#L327: s = check.sprintf("%s", t)
assignments.go#L335: s = check.sprintf("%s", t.elem)
builtins.go#L104: cause = check.sprintf("%s has core type %s", x, u)
builtins.go#L106: cause = check.sprintf("%s has no core type", x)
builtins.go#L109: cause = check.sprintf("have %s", x)
call.go#L654: context := check.sprintf("argument to %s", call.Fun)
conversions.go#L65: cause = check.sprintf("%s does not contain specific types", T)
conversions.go#L74: cause = check.sprintf("constant %s overflows %s (in %s)", x.val, u, T)
conversions.go#L76: cause = check.sprintf("cannot convert %s to type %s (in %s)", x, u, T)
conversions.go#L239: msg := check.sprintf(format, args...)
errors.go#L61: err.desc = append(err.desc, errorDesc{at, err.check.sprintf(format, args...)})
errors.go#L254: msg := check.sprintf(format, args...)
errsupport.go#L76: return check.sprintf("unknown field %s in struct literal of type %s", sel, typ)
errsupport.go#L78: return check.sprintf("unknown field %s in struct literal of type %s, but does have %s", sel, typ, alt)
errsupport.go#L80: return check.sprintf("unknown field %s in struct literal of type %s, but does have unexported %s", sel, typ, alt)
errsupport.go#L82: return check.sprintf("cannot refer to unexported field %s in struct literal of type %s", alt, typ)
errsupport.go#L94: return check.sprintf("type %s has no field or method %s", typ, sel)
errsupport.go#L96: return check.sprintf("type %s has no field or method %s, but does have %s %s", typ, sel, what, alt)
errsupport.go#L98: return check.sprintf("type %s has no field or method %s, but does have unexported %s %s", typ, sel, what, alt)
errsupport.go#L100: return check.sprintf("cannot refer to unexported %s %s", what, alt)
expr.go#L478: cause = check.sprintf("mismatched types %s and %s", x.typ, y.typ)
expr.go#L557: cause = check.sprintf("type parameter %s cannot use operator %s", errOp.typ, op)
expr.go#L562: what = check.sprintf("%s", errOp.typ)
expr.go#L564: cause = check.sprintf("operator %s not defined on %s", op, what)
expr.go#L585: cause = check.sprintf(format, args...)
format.go#L80: func (check *Checker) sprintf(format string, args ...any) string {
instantiate.go#L202: msg := check.sprintf("%s type arguments for type %s: have %d, want %d", qual, name, got, want)
instantiate.go#L256: detail = check.sprintf("type %s is pointer to interface, not interface", T)
instantiate.go#L258: detail = check.sprintf("%s is not an interface", T)
instantiate.go#L260: *cause = check.sprintf("%s does not %s %s (%s)", V, verb, T, detail)
instantiate.go#L282: *cause = check.sprintf("cannot %s %s (empty type set)", verb, T)
instantiate.go#L290: *cause = check.sprintf("%s does not %s %s %s", V, verb, T, *cause)
instantiate.go#L313: *cause = check.sprintf("%s to %s comparable requires go1.20 or later", V, verb)
instantiate.go#L318: *cause = check.sprintf("%s does not %s comparable", V, verb)
instantiate.go#L336: *cause = check.sprintf("%s does not %s %s", V, verb, T)
instantiate.go#L365: detail = check.sprintf("possibly missing ~ for %s in %s", alt, T)
instantiate.go#L367: detail = check.sprintf("%s mentions %s, but %s is not in the type set of %s", T, V, V, T)
instantiate.go#L369: detail = check.sprintf("%s missing in %s", V, Ti.typeSet().terms)
instantiate.go#L371: *cause = check.sprintf("%s does not %s %s (%s)", V, verb, T, detail)
lookup.go#L442: *cause = check.sprintf("(missing method %s)", m.Name())
lookup.go#L446: *cause = check.sprintf("(missing method %s)\n\t\thave %s\n\t\twant %s", m.Name(), fs, ms)
lookup.go#L448: *cause = check.sprintf("(unexported method %s)", m.Name())
lookup.go#L464: *cause = check.sprintf("(wrong type for method %s)", m.Name())
lookup.go#L467: *cause = check.sprintf("(wrong type for method %s)\n\t\thave %s\n\t\twant %s", m.Name(), fs, ms)
lookup.go#L469: *cause = check.sprintf("(ambiguous selector %s.%s)", V, m.Name())
lookup.go#L471: *cause = check.sprintf("(method %s has pointer receiver)", m.Name())
lookup.go#L473: *cause = check.sprintf("(%s.%s is a field, not a method)", V, m.Name())
lookup.go#L522: return check.sprintf("type %s is pointer to type parameter, not type parameter", T)
lookup.go#L524: return check.sprintf("type %s is pointer to interface, not interface", T)
operand.go#L404: msg := check.sprintf(format, args...)
typexpr.go#L215: *cause = check.sprintf("%s is not a generic type", typ)